<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 需求：实现两个数的值交换(函数版本)  
        function sum(a = 0, b = 0) {
            let temp
            // a赋值给tamp
            temp = a;
            // b赋值给a
            a = b;
            // temp赋值给b
            b = temp;
            console.log(a, b);

        }
        sum(3, 4)

    </script>
</body>

</html>